package com.ysu.shop.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ysu.shop.pojo.BasePojo;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * <p>
 * 权限
 * </p>
 *
 * @author 耿志龙
 * @since 2020-10-01
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("permission")
public class Permission extends BasePojo {

    private static final long serialVersionUID = 1L;

    /**
     * 权限名
     */
    @TableField("name")
    private String name;

    /**
     * 权限路径
     */
    @TableField("url")
    private String url;

    /**
     * 资源类型 0目录 1导航
     */
    @TableField("type")
    private Integer type;

    /**
     * 父类id
     */
    @TableField("parent_id")
    private Integer parentId;

    /**
     * 子权限
     */
    @TableField(exist = false)
    private List<Permission> children;
}
